#include "customview.h"


CustomView::CustomView(QWidget *parent) : QGraphicsView(parent)
{
   count = 0;
}
void CustomView::Mouse_pressed()
{


}
void CustomView::inc(MainWindow *MW)
{
    MaWi=MW;
}

void CustomView::mousePressEvent(QMouseEvent*ev)
{
    if(ev->buttons() & Qt::LeftButton)
       {MaWi->left=true;}
    else
        {MaWi->left=false;}

    MaWi->x=(ev->x());
    MaWi->y=(ev->y());
    MaWi->drawFunck();
    qDebug()<<ev->x()<<ev->y();
    emit Mouse_pressed();

}
